package controller;

import java.util.List;

import dao.EmpDAO;
import entities.Emp;

/**
 *
 * <一句话功能简述>
 * <功能详细描述>
 *
 * @author  wKF63324
 * @version  [版本号, 2012-10-30]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
public class EmpAction
{
    private Emp emp;

    private int id;

    private List<Emp> list;

    private EmpDAO empDAO;

    /**
     * <一句话功能简述>
     * <功能详细描述>
     * @return list
     * @see [类、类#方法、类#成员]
     */
    public String execute()
    {
        empDAO = new EmpDAO();
        list = empDAO.findAll();
        return "list";
    }

    public Emp getEmp()
    {
        return emp;
    }

    public void setEmp(Emp emp)
    {
        this.emp = emp;
    }

    public int getId()
    {
        return id;
    }

    public void setId(int id)
    {
        this.id = id;
    }

    public List<Emp> getList()
    {
        return list;
    }

    public void setList(List<Emp> list)
    {
        this.list = list;
    }

    public EmpDAO getEmpDAO()
    {
        return empDAO;
    }

    public void setEmpDAO(EmpDAO empDAO)
    {
        this.empDAO = empDAO;
    }

}
